package com.xiaoming;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import com.xiaoming.service.UserServiceImpl;

@SpringBootApplication
public class ServerBootstrap {

    public static void main(String[] args) throws Exception {
        Address address = new Address();
        address.setPort(8081);
        address.setHost("127.0.0.1");
        UserServiceImpl.startServer(address);
        ZKBuilder.build(null,5000).createNode("/server-1",address);
        SpringApplication.run(ServerBootstrap.class,args);
    }
}
